<?php

$smarty->template_dir = 'components/users/templates/';
$smarty->compile_dir = 'components/users/templates_c/';

if($_POST['signup']==1) $_GET['task']='register';
if(!isset($_GET['task'])) $_GET['task']='logout';

if($_GET['task']=="login"){
	$smarty->display('login.tpl');
}else if($_GET['task']=='register'){
	require("register.php");	
}else if($_GET['task']=='logout'){
 	session_destroy();
 	header("Location: index.php");
 	exit;
}

?> 
